<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        /*数组*/
        var arr = [];    //等价于 new Array()
        var arr1 = new Array();
        arr[0]=1;
        arr[1]='鲁';


        console.log(arr)
        for (var i = 0; i <arr.length; i++) {
            console.log(typeof arr[i]);
        }

        console.log(arr[2]);  //undefined


        var arr2=['red','鲁大师','pink'];
        var str='';
        var sep='*'
        for (var i = 0; i < arr2.length; i++) {
            str+=arr2[i]+sep;
        }
        console.log(str)


        var arr3=['一月','二月','三月','四月']
        var num= '02'-0;                      //注意  var num=02  不行
        console.log(num)
        console.log(arr3[num])

    </script>
</head>
<body>

</body>
</html>